3.392 \(\int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx\)

Optimal. Leaf size=643 \[ \frac {a^{3/4} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{b} (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{\sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}} \]

[Out]

-1/2*arctan((a+b)^(1/2)*tan(x)/(a+b*tan(x)^4)^(1/2))*(a+b)^(1/2)+1/3*(a+b*tan(x)^4)^(1/2)*tan(x)-b^(1/2)*(a+b*
tan(x)^4)^(1/2)*tan(x)/(a^(1/2)+b^(1/2)*tan(x)^2)+a^(1/4)*b^(1/4)*(cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))^2)^(1
/2)/cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))*EllipticE(sin(2*arctan(b^(1/4)*tan(x)/a^(1/4))),1/2*2^(1/2))*((a+b*t
an(x)^4)/(a^(1/2)+b^(1/2)*tan(x)^2)^2)^(1/2)*(a^(1/2)+b^(1/2)*tan(x)^2)/(a+b*tan(x)^4)^(1/2)+1/3*a^(3/4)*(cos(
2*arctan(b^(1/4)*tan(x)/a^(1/4)))^2)^(1/2)/cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))*EllipticF(sin(2*arctan(b^(1/4
)*tan(x)/a^(1/4))),1/2*2^(1/2))*((a+b*tan(x)^4)/(a^(1/2)+b^(1/2)*tan(x)^2)^2)^(1/2)*(a^(1/2)+b^(1/2)*tan(x)^2)
/b^(1/4)/(a+b*tan(x)^4)^(1/2)+1/2*b^(1/4)*(a+b)*(cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))^2)^(1/2)/cos(2*arctan(b
^(1/4)*tan(x)/a^(1/4)))*EllipticF(sin(2*arctan(b^(1/4)*tan(x)/a^(1/4))),1/2*2^(1/2))*((a+b*tan(x)^4)/(a^(1/2)+
b^(1/2)*tan(x)^2)^2)^(1/2)*(a^(1/2)+b^(1/2)*tan(x)^2)/a^(1/4)/(a^(1/2)-b^(1/2))/(a+b*tan(x)^4)^(1/2)-1/2*b^(1/
4)*(cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))^2)^(1/2)/cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))*EllipticF(sin(2*arcta
n(b^(1/4)*tan(x)/a^(1/4))),1/2*2^(1/2))*(a^(1/2)-b^(1/2))*((a+b*tan(x)^4)/(a^(1/2)+b^(1/2)*tan(x)^2)^2)^(1/2)*
(a^(1/2)+b^(1/2)*tan(x)^2)/a^(1/4)/(a+b*tan(x)^4)^(1/2)-1/4*(a+b)*(cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))^2)^(1
/2)/cos(2*arctan(b^(1/4)*tan(x)/a^(1/4)))*EllipticPi(sin(2*arctan(b^(1/4)*tan(x)/a^(1/4))),-1/4*(a^(1/2)-b^(1/
2))^2/a^(1/2)/b^(1/2),1/2*2^(1/2))*(a^(1/2)+b^(1/2))*((a+b*tan(x)^4)/(a^(1/2)+b^(1/2)*tan(x)^2)^2)^(1/2)*(a^(1
/2)+b^(1/2)*tan(x)^2)/a^(1/4)/b^(1/4)/(a^(1/2)-b^(1/2))/(a+b*tan(x)^4)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.50, antiderivative size = 643, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {3670, 1336, 195, 220, 1209, 1198, 1196, 1217, 1707} \[ \frac {a^{3/4} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{b} (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{\sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]

[Out]

-(Sqrt[a + b]*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a + b*Tan[x]^4]])/2 + (Tan[x]*Sqrt[a + b*Tan[x]^4])/3 - (Sqrt[b
]*Tan[x]*Sqrt[a + b*Tan[x]^4])/(Sqrt[a] + Sqrt[b]*Tan[x]^2) + (a^(1/4)*b^(1/4)*EllipticE[2*ArcTan[(b^(1/4)*Tan
[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/Sqrt[a
 + b*Tan[x]^4] + (a^(3/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt
[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(3*b^(1/4)*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] - Sqrt[b])*b^(
1/4)*EllipticF[2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sq
rt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*a^(1/4)*Sqrt[a + b*Tan[x]^4]) + (b^(1/4)*(a + b)*EllipticF[2*ArcTan[(b^(1/4)*
Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Tan[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(2*
a^(1/4)*(Sqrt[a] - Sqrt[b])*Sqrt[a + b*Tan[x]^4]) - ((Sqrt[a] + Sqrt[b])*(a + b)*EllipticPi[-(Sqrt[a] - Sqrt[b
])^2/(4*Sqrt[a]*Sqrt[b]), 2*ArcTan[(b^(1/4)*Tan[x])/a^(1/4)], 1/2]*(Sqrt[a] + Sqrt[b]*Tan[x]^2)*Sqrt[(a + b*Ta
n[x]^4)/(Sqrt[a] + Sqrt[b]*Tan[x]^2)^2])/(4*a^(1/4)*(Sqrt[a] - Sqrt[b])*b^(1/4)*Sqrt[a + b*Tan[x]^4])

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 220

Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[((1 + q^2*x^2)*Sqrt[(a + b*x^4)/(a*(
1 + q^2*x^2)^2)]*EllipticF[2*ArcTan[q*x], 1/2])/(2*q*Sqrt[a + b*x^4]), x]] /; FreeQ[{a, b}, x] && PosQ[b/a]

Rule 1196

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 4]}, -Simp[(d*x*Sqrt[a + c
*x^4])/(a*(1 + q^2*x^2)), x] + Simp[(d*(1 + q^2*x^2)*Sqrt[(a + c*x^4)/(a*(1 + q^2*x^2)^2)]*EllipticE[2*ArcTan[
q*x], 1/2])/(q*Sqrt[a + c*x^4]), x] /; EqQ[e + d*q^2, 0]] /; FreeQ[{a, c, d, e}, x] && PosQ[c/a]

Rule 1198

Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(e + d*q)/q, Int
[1/Sqrt[a + c*x^4], x], x] - Dist[e/q, Int[(1 - q*x^2)/Sqrt[a + c*x^4], x], x] /; NeQ[e + d*q, 0]] /; FreeQ[{a
, c, d, e}, x] && PosQ[c/a]

Rule 1209

Int[((a_) + (c_.)*(x_)^4)^(p_)/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Dist[(e^2)^(-1), Int[(c*d - c*e*x^2)*(a +
c*x^4)^(p - 1), x], x] + Dist[(c*d^2 + a*e^2)/e^2, Int[(a + c*x^4)^(p - 1)/(d + e*x^2), x], x] /; FreeQ[{a, c,
 d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p + 1/2, 0]

Rule 1217

Int[1/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[c/a, 2]}, Dist[(c*d + a*e*q
)/(c*d^2 - a*e^2), Int[1/Sqrt[a + c*x^4], x], x] - Dist[(a*e*(e + d*q))/(c*d^2 - a*e^2), Int[(1 + q*x^2)/((d +
 e*x^2)*Sqrt[a + c*x^4]), x], x]] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0]
&& PosQ[c/a]

Rule 1336

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(f*x)^m*(d + e*x^2)^q*(a + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e, f, m, p, q}, x] && (IGtQ[p, 0] || IGtQ[q,
 0] || IntegersQ[m, q])

Rule 1707

Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (c_.)*(x_)^4]), x_Symbol] :> With[{q = Rt[B/A, 2]
}, -Simp[((B*d - A*e)*ArcTan[(Rt[(c*d)/e + (a*e)/d, 2]*x)/Sqrt[a + c*x^4]])/(2*d*e*Rt[(c*d)/e + (a*e)/d, 2]),
x] + Simp[((B*d + A*e)*(A + B*x^2)*Sqrt[(A^2*(a + c*x^4))/(a*(A + B*x^2)^2)]*EllipticPi[Cancel[-((B*d - A*e)^2
/(4*d*e*A*B))], 2*ArcTan[q*x], 1/2])/(4*d*e*A*q*Sqrt[a + c*x^4]), x]] /; FreeQ[{a, c, d, e, A, B}, x] && NeQ[c
*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[c/a] && EqQ[c*A^2 - a*B^2, 0]

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx &=\operatorname {Subst}\left (\int \frac {x^2 \sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\sqrt {a+b x^4}-\frac {\sqrt {a+b x^4}}{1+x^2}\right ) \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \sqrt {a+b x^4} \, dx,x,\tan (x)\right )-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}+\frac {1}{3} (2 a) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-(a+b) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^4}} \, dx,x,\tan (x)\right )+\operatorname {Subst}\left (\int \frac {b-b x^2}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )\\ &=\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}+\frac {a^{3/4} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}+\left (\sqrt {a} \sqrt {b}\right ) \operatorname {Subst}\left (\int \frac {1-\frac {\sqrt {b} x^2}{\sqrt {a}}}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-\left (\left (\sqrt {a}-\sqrt {b}\right ) \sqrt {b}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-\frac {\left (\sqrt {a} (a+b)\right ) \operatorname {Subst}\left (\int \frac {1+\frac {\sqrt {b} x^2}{\sqrt {a}}}{\left (1+x^2\right ) \sqrt {a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt {a}-\sqrt {b}}+\frac {\left (\sqrt {b} (a+b)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt {a}-\sqrt {b}}\\ &=-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{a} \sqrt [4]{b} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{\sqrt {a+b \tan ^4(x)}}+\frac {a^{3/4} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{b} (a+b) F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{4 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 17.88, size = 550, normalized size = 0.86 \[ \left (\frac {\tan (x)}{3}-\frac {1}{2} \sin (2 x)\right ) \sqrt {\frac {4 a \cos (2 x)+a \cos (4 x)+3 a-4 b \cos (2 x)+b \cos (4 x)+3 b}{4 \cos (2 x)+\cos (4 x)+3}}+\frac {3 b \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan ^5(x)+3 a \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)+\left (3 \sqrt {a} \sqrt {b}-2 i a-3 i b\right ) \left (\tan ^2(x)+1\right ) \sqrt {\frac {b \tan ^4(x)}{a}+1} F\left (\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )-3 \sqrt {a} \sqrt {b} \left (\tan ^2(x)+1\right ) \sqrt {\frac {b \tan ^4(x)}{a}+1} E\left (\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i a \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i b \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i a \tan ^2(x) \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i b \tan ^2(x) \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \left (\tan ^2(x)+1\right ) \sqrt {a+b \tan ^4(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^2*Sqrt[a + b*Tan[x]^4],x]

[Out]

Sqrt[(3*a + 3*b + 4*a*Cos[2*x] - 4*b*Cos[2*x] + a*Cos[4*x] + b*Cos[4*x])/(3 + 4*Cos[2*x] + Cos[4*x])]*(-1/2*Si
n[2*x] + Tan[x]/3) + (3*a*Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x] + 3*Sqrt[(I*Sqrt[b])/Sqrt[a]]*b*Tan[x]^5 + (3*I)*a*
EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b*Tan[x]^4)/a] +
 (3*I)*b*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Sqrt[1 + (b*Tan[x
]^4)/a] + (3*I)*a*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*Tan[x]^2
*Sqrt[1 + (b*Tan[x]^4)/a] + (3*I)*b*EllipticPi[((-I)*Sqrt[a])/Sqrt[b], I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan
[x]], -1]*Tan[x]^2*Sqrt[1 + (b*Tan[x]^4)/a] - 3*Sqrt[a]*Sqrt[b]*EllipticE[I*ArcSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*
Tan[x]], -1]*(1 + Tan[x]^2)*Sqrt[1 + (b*Tan[x]^4)/a] + ((-2*I)*a + 3*Sqrt[a]*Sqrt[b] - (3*I)*b)*EllipticF[I*Ar
cSinh[Sqrt[(I*Sqrt[b])/Sqrt[a]]*Tan[x]], -1]*(1 + Tan[x]^2)*Sqrt[1 + (b*Tan[x]^4)/a])/(3*Sqrt[(I*Sqrt[b])/Sqrt
[a]]*(1 + Tan[x]^2)*Sqrt[a + b*Tan[x]^4])

________________________________________________________________________________________

fricas [F]  time = 38.64, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="fricas")

[Out]

integral(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="giac")

[Out]

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)

________________________________________________________________________________________

maple [C]  time = 0.23, size = 537, normalized size = 0.84 \[ \frac {\sqrt {a +b \left (\tan ^{4}\relax (x )\right )}\, \tan \relax (x )}{3}+\frac {2 a \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}+\frac {b \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}+\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticE \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {a \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticPi \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {b \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticPi \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(x)^4)^(1/2)*tan(x)^2,x)

[Out]

1/3*(a+b*tan(x)^4)^(1/2)*tan(x)+2/3*a/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1
/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)+b/(I/a^(1/2)*b^
(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*El
lipticF(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)-I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*t
an(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticF(tan(x)*(I/a^(1/2)*b^(1/2))^
(1/2),I)+I*b^(1/2)*a^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)
*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticE(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I)-a/(I/a^(1/2)*b^(1/2))^(1/2
)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^(1/2)*EllipticPi(ta
n(x)*(I/a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1/2))^(1/2)/(I/a^(1/2)*b^(1/2))^(1/2))-b/(I/a^
(1/2)*b^(1/2))^(1/2)*(1-I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)*(1+I/a^(1/2)*b^(1/2)*tan(x)^2)^(1/2)/(a+b*tan(x)^4)^
(1/2)*EllipticPi(tan(x)*(I/a^(1/2)*b^(1/2))^(1/2),I*a^(1/2)/b^(1/2),(-I/a^(1/2)*b^(1/2))^(1/2)/(I/a^(1/2)*b^(1
/2))^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)^4)^(1/2)*tan(x)^2,x, algorithm="maxima")

[Out]

integrate(sqrt(b*tan(x)^4 + a)*tan(x)^2, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\mathrm {tan}\relax (x)}^2\,\sqrt {b\,{\mathrm {tan}\relax (x)}^4+a} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^2*(a + b*tan(x)^4)^(1/2),x)

[Out]

int(tan(x)^2*(a + b*tan(x)^4)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \tan ^{4}{\relax (x )}} \tan ^{2}{\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(x)**4)**(1/2)*tan(x)**2,x)

[Out]

Integral(sqrt(a + b*tan(x)**4)*tan(x)**2, x)

________________________________________________________________________________________